Skip to content

[BI-2931] Address final areas where brapi programDbId can be used instead of BI id - #583

Open
jloux-brapi wants to merge 3 commits into
epic/BI-2862from
feature/BI-2931
Open

jloux-brapi wants to merge 3 commits into
epic/BI-2862from
feature/BI-2931

Conversation

@jloux-brapi

@jloux-brapi jloux-brapi commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Story: BI-2931

  • Removed setDbIds() usage in BrAPITrialsController
  • Removed setDbIds() usage in BrAPIObservationUnitsController
  • Updated BrAPIProgramsController to return brapiProgramDbId and also filter using the brapi id where applicable

Dependencies

Testing

This will involve testing the BI-BrAPI endpoints. You will need a bearer token generated in DeltaBreed BrAPI tab to test these.

  • Test the GET trials endpoint (/programs/{biProgramId}/brapi/v2/trials and verify the programDbId in the response is the brapi program dbId and that it corresponds to the appropriate program
  • Utilize the trialDbId from an entry in the last response to test the GET trials by dbId endpoint (/programs/{biProgramId}/brapi/v2/trials/{brapiTrialDbId} and verify the programDbId in the response is the brapi programDbId and that it corresponds to the appropriate program.
  • Test the GET observationunits endpoint (/programs/{biProgramId}/brapi/v2/observationunits and verify the programDbId in the response is the brapi program dbId and that it corresponds to the appropriate program. Verify also that the germplasmDbId in the response is a brapi germplasm dbId.
  • Utilize the observationUnitDbId from an entry in the last response to test the GET observationunits by DbId endpoint (/programs/{biProgramId}/brapi/v2/observationunits/observationUnitDbId and verify the programDbId in the response is the brapi program dbId and that it corresponds to the appropriate program. Verify also that the germplasmDbId in the response is a brapi germplasm dbId.
  • Test the GET programs endpoint (/programs/{biProgramId}/brapi/v2/programs) and verify the programDbId in the response is a brapi program dbId and that it corresponds to the appropriate program
  • Utilize the programDbId from an entry in the last response to test the GET programs endpoint (/programs/{biProgramId}/brapi/v2/programs/{programDbId}) and verify the programDbId in the response is a brapi program dbId and that it corresponds to the appropriate program

For the following two endpoints, for the bearer token it seems you can use one generated by any program.

  • Test the GET root programs endpoint (/brapi/v2/programs) and verify the programDbId in the response is a brapi program dbId and that it corresponds to the appropriate program
  • Test the GET root programs by DbId endpoint ( (/brapi/v2/programs/{brapiProgramDbId}) and verify the programDbId in the response is a brapi program dbId and that it corresponds to the appropriate program

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have create/modified unit and/or integration tests to cover this change or tests are not applicable
  • I have commented my code, particularly in hard-to-understand areas
  • I have either updated the source of truth or arranged for update with product owner if needed https://breedinginsight.atlassian.net/wiki/spaces/BI/pages/1559953409/Source+of+Truth

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant